1. Field of the Invention
This invention relates to a normal vector computation method and, more particularly, to a normal vector computation method well-suited for application when computing a tool offset path on a three-dimensional curved surface.
2. Description of Related Art
A curved surface CSF (see FIG. 7) on a design drawing of a three-dimensional mold or the like generally is expressed by a plurality of section curves (e.g.basic curves BC11 BC12 and drive curves DC11, DC12). Shape data indicative of the shape between a certain section curve and the next section curve (e.g. between the basic curves or the drive curves) do not exist. When numerically controlled machining is performed, however, it is required that machining be carried out in such a manner that a smooth connection can be made between the aforementioned section curves even if the intermediate shape is not given. To this end, an automatic programming method has been put into practical use in which points P.sub.i,j (the black dots) on a curved surface CSF surrounded by the aforementioned section curves are discretely obtained, the curved surface is expressed as a set of the discretely obtained points, and an NC tape is automatically created to control the nose of a tool to successively traverse these points.
The path of the tool center is a path offset a prescribed amount in a prescribed direction from a path (a cutting path) on the curved surface. For example, in the case of a ball end mill, as shown in FIG. 8, a path TP of the tool center is decided in such a manner that the direction of a line connecting a cutting point P.sub.i,j on the curved surface CSF and the tool center P.sub.T assumes the direction of a normal line at the cutting point. NC data are created in such a manner that the tool center P.sub.T traverses the path TP. In the case of a flat end mill, contoured cutting tool or the like, the direction of a line connecting the tool center and the cutting point is not the direction of the normal line, but the normal vector at the cutting point is required in order to obtain the tool center paths of these tools.
To this end, the approach in the prior art is, as shown in FIG. 9, to compute a normal vector V at the cutting point using a total of five points, namely three points P.sub.i,j-1, P.sub.i,j, P.sub.i,j+1 along a first direction (the BC direction) with the cutting point P.sub.i,j as the middle point, and three points P.sub.i-1,j, P.sub.i,j, P.sub.i+1,j along a second direction (the DC direction) with the cutting point P.sub.i,j as the middle point. More specifically, the conventional approach includes obtaining an approximate tangent vector V.sub.BC in the first direction at the cutting point P.sub.i,j in accordance with the following equation: EQU V.sub.BC =P.sub.i,j+1 -P.sub.i,j-1 ( 1)
obtaining an approximate tangent vector V.sub.DC in the second direction at the cutting point P.sub.i,j in accordance with the following equation: EQU V.sub.DC =P.sub.i+1,j -P.sub.i-1,j ( 2)
and calculating a normal vector V the cutting point P.sub.i,j in accordance with the following equation: EQU V=V.sub.BC .times.V.sub.DC ( 3)
However, since this conventional method of calculating the normal vector at the cutting point uses the coordinates of a total of five points, it takes time to obtain the normal vector at each cutting point and, as a result, a considerable period of time is required until NC data are obtained.